home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compendium Deluxe 2
/
LSD and 17bit Compendium Deluxe - Volume II.iso
/
a
/
prog
/
asmsrc
/
thesource-7.lha
/
Source
/
DefFunc.lha
/
DefFunc
/
dfcsymtable.h
< prev
next >
Wrap
C/C++ Source or Header
|
1993-12-14
|
3KB
|
102 lines
/*********************************************************
*
* Copyright (c) 1993 Ke Jin
*
* Permission to use, copy, modify, and distribute
* this software and its documentation without fee
* is granted, provided that the author's name and
* this copyright notice are retained.
*
* -----------------------------------------------------
*
* dfcsymtable.h -- interface of defunc symbol table
*
* struct definition : Symbol_record;
*
* external function : getsym();
* getfnctname();
* getarguname();
* initargu();
*
* nameargu();
* namefnct();
* namecnst();
* clrfnct();
* clrfnctall();
* clrcnst();
* clrcnstall();
*
* matha2z();
*
*********************************************************/
#ifndef _DFCSYMTABLE_H
#define _DFCSYMTABLE_H
#ifndef NeedFunctionPrototypes
#if defined(__STDC__)||defined(__cplusplus)
#define NeedFunctionPrototypes 1
#else
#define NeedFunctionPrototypes 0
#endif /* __STDC__ */
#endif /* NeedFunctionPrototypes */
#ifdef __cplusplus
extern "C" { /* for c++ */
#endif
typedef enum {
arg_symbol, const_symbol, fnct_symbol
} Symbol_type;
typedef struct symbol_record
/* association between symbol and its content */
{
char* name;
Symbol_type type;
union {
int argidx;
double value;
double (*fnctptr)();
} content;
struct symbol_record* next;
} Symbol_record;
#if NeedFunctionPrototypes
extern Symbol_record* getsym(char* name);
extern char* getfnctname(double (*fnctptr)());
extern char* getarguname(int argidx);
extern int initargu(void);
extern int nameargu(char* name4arg1, char* name4arg2);
extern int namefnct(char* name, double (*fnctptr)());
extern int namecnst(char* name, double constexpress);
extern int clrfnct(char* name);
extern int clrfnctall(void);
extern int clrcnst(char* name);
extern int clrcnstall(void);
extern int matha2z(void);
#else
extern Symbol_record* getsym(); /* searching symbol in sym_table */
extern char* getfnctname();
extern char* getarguname();
extern int initargu();
extern int nameargu();
extern int namefnct(); /* function alias name */
extern int namecnst(); /* constant alias name */
extern int clrfnct();
extern int clrfnctall();
extern int clrcnst();
extern int clrcnstall();
extern int matha2z();
#endif /* NeedFunctionPrototypes */
#ifdef __cplusplus
} /* end for c++ */
#endif
#endif /* _DFCSYMTABLE_H */